import pandas as pd
import matplotlib.pyplot as plt
# 读取CSV文件
data = pd.read_csv('data_resource\marine_eco_data.csv')
# 绘制不同生物种类数量的条形图
plt.figure(figsize=(10, 6))
plt.bar(data['species'], data['quantity'])
plt.xlabel('species')
plt.ylabel('quantity')
plt.title('Marine ecological data')
plt.xticks(rotation=45)
plt.grid(True)
plt.show()